package com.cskaoyan.javase.oop3._2example.test;

import com.cskaoyan.javase.oop3._2example.model.Goods;
import com.cskaoyan.javase.oop3._2example.operation.IGoods;
import com.cskaoyan.javase.oop3._2example.operation.impl.IGoodsImpl;
import javafx.scene.input.InputMethodTextRun;

/**
 *
 *
 * @since 15:19
 * @author wuguidong@cskaoyan.onaliyun.com
 */
public class Demo {
    public static void main(String[] args) {
        IGoods ig = new IGoodsImpl();
        Goods[] allGoods = ig.getAllGoods();
        for (Goods goods : allGoods) {
            goods.print();
        }

        boolean result = ig.createGoods(new Goods(3, "小米13", 6999));
        System.out.println(result);
        Goods[] allGoods2 = ig.getAllGoods();
        for (Goods goods : allGoods2) {
            goods.print();
        }

        boolean result2 = ig.deleteGoods(10);
        System.out.println(result2);
        Goods[] allGoods3 = ig.getAllGoods();
        for (Goods goods : allGoods3) {
            goods.print();
        }
    }
}
